<?php

namespace app\controller;

use liketp\App;
use liketp\Container;
use liketp\facade\Db;

class Test
{
    public function __construct(?string $name = 'name', ?string $age = 'age', ?Container $app = null, ?array $arr = [])
    {
        //dump(__METHOD__, compact('name', 'age', 'app', 'arr'));
    }

    public function test($name = 'name', $age = 'age', $sport = 'sport')
    {
        halt(__METHOD__, compact('name', 'age', 'sport'));
    }

    public function say($uid)
    {
        $user = Db::table('users')->find($uid);
        return 'hi, ' . $user['name'];
    }
}
